import request from '@/utils/request'

// 查询积分商品分类列表
export function listCategory (query) {
    return request({
        url: '/points/category/list',
        method: 'get',
        params: query
    })
}
export function listAllCategory () {
    return request({
        url: '/points/category/listAll',
        method: 'get'
    })
}
// 查询积分商品分类详细
export function getCategory (id) {
    return request({
        url: '/points/category/detail/' + id,
        method: 'get'
    })
}

// 新增积分商品分类
export function addCategory (data) {
    return request({
        url: '/points/category/insert',
        method: 'post',
        data: data
    })
}

// 修改积分商品分类
export function updateCategory (data) {
    return request({
        url: '/points/category/update',
        method: 'post',
        data: data
    })
}

// 删除积分商品分类
export function delCategory (id) {
    return request({
        url: '/points/category/delete/' + id,
        method: 'post'
    })
}
